﻿using System.Collections.Generic;
using System.Domain.Entity;
using Domain.Infrastructure;

namespace System.Domain.IRepository
{
    /// <summary>
    /// 角色权限返回
    /// </summary>
    public class RoleAuthorizeEntity
    {
        /// <summary>
        /// 模块主键
        /// </summary>
        public string ModuleId { get; set; }
        /// <summary>
        /// 权限名字
        /// </summary>
        public string AuthorizeId { get; set; }
        /// <summary>
        /// 权限名字
        /// </summary>
        public string Name { get; set; }
    }
    /// <summary>
    ///角色授权表接口 
    /// </summary>	
    public interface ISysRoleAuthorizeRepository : IRepositoryBase<SysRoleAuthorizeEntity>
    {
        /// <summary>
        /// 通过角色 拿到权限
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        List<SysRoleAuthorizeEntity> GetList(string roleId);
        /// <summary>
        /// 通过角色 拿到模块
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        List<SysModuleEntity> GetMenuList(string roleId);
        /// <summary>
        /// 通过角色 拿到模块权限
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        List<SysModuleAuthorizeEntity> GetButtonList(string roleId);
        /// <summary>
        /// 验证权限
        /// </summary>
        /// <param name="roleId"></param> 
        /// <param name="url"></param>
        /// <returns></returns>
        RoleAuthorizeEntity ActionValidate(string roleId, string url);
    }

}



